Custom dynamic flex fields get archived only if they also exist in the respective archive entity, with prefix ar. For example, if the custom dynamic flex field unitCustomDFFString1 exists in the Unit entity, N4 archives it only if the field arunitCustomDffString1 is available in the ArchiveUnit entity.
In other words, when you create custom dynamic flex fields in the Unit entity and want them to be archived before being purged, you must create the same fields with the prefix ar for the ArchiveUnit entity. You do this the same way you add custom dynamic flex fields in the first place. For more information, see Customize System Entity form (on page 1) in the online help or on the Kaleris Community Portal.